const webSocket = {
  initSocket: function(messageCallback, closeCallback, channel) {
    const wsUrl = config.BASE_WEBSOCKET_API + '/' + channel
    const oWebSocket = new WebSocket(wsUrl)
    oWebSocket.onmessage = messageCallback
    oWebSocket.onclose = closeCallback

    return oWebSocket
  }

}

export default webSocket
